#ifndef __SCNS_BUFFER_H__
#define __SCNS_BUFFER_H__

#include "ScnsConfig.h"

#if defined(SCNS_BUFFER_ENABLE)&&SCNS_BUFFER_ENABLE==1

#include "ScnsYing.h"

extern uint32 scnsBufferSetUint8(uint8*buf,uint32 i,uint32 l,uint8 d);
extern uint32 scnsBufferSetInt8(uint8*buf,uint32 i,uint32 l,int8 d);
extern uint32 scnsBufferSetUint16(uint8*buf,uint32 i,uint32 l,uint16 d);
extern uint32 scnsBufferSetInt16(uint8*buf,uint32 i,uint32 l,int16 d);
extern uint32 scnsBufferSetUint32(uint8*buf,uint32 i,uint32 l,uint32 d);
extern uint32 scnsBufferSetInt32(uint8*buf,uint32 i,uint32 l,int32 d);
extern uint32 scnsBufferSetFloat(uint8*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBufferSetUint64(uint8*buf,uint32 i,uint32 l,uint64 d);

extern uint8 scnsBufferGetUint8(const uint8*buf,uint32 i,uint32 l);
extern int8 scnsBufferGetInt8(const uint8*buf,uint32 i,uint32 l);
extern uint16 scnsBufferGetUint16(const uint8*buf,uint32 i,uint32 l);
extern int16 scnsBufferGetInt16(const uint8*buf,uint32 i,uint32 l);
extern uint32 scnsBufferGetUint32(const uint8*buf,uint32 i,uint32 l);
extern int32 scnsBufferGetInt32(const uint8*buf,uint32 i,uint32 l);
extern float scnsBufferGetFloat(const uint8*buf,uint32 i,uint32 l);
extern uint64 scnsBufferGetUint64(const uint8*buf,uint32 i,uint32 l);
#endif
#endif
